import request from '@/utils/request';

export async function getDeInfoByPage(params: any) {
  return request('/api/device/getDeInfoByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addDeInfo(params: any) {
  return request('/api/device/addDeInfo', {
    method: 'POST',
    data: params,
  });
}

export async function updateDeInfo(params: any) {
  return request('/api/device/updateDeInfo', {
    method: 'POST',
    data: params,
  });
}

export async function delDeInfo(params: any) {
  return request('/api/device/delDeInfo', {
    method: 'POST',
    data: params,
  });
}

export async function exportDeInfo(params: any) {
  return request('/api/device/exportDeInfo', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default { getDeInfoByPage, addDeInfo, updateDeInfo, delDeInfo, exportDeInfo };
